<?php

/**
 * Created by PhpStorm.
 * Author: ls
 * Time: 2023/9/18 14:58
 * Desc: 积分相关
 */
class Request_Api_V2_Integral_Integral extends Request_Api_V2_Base
{

    public function __construct($request_param)
    {
        parent::__construct($request_param);
    }

    public function get_integral()
    {
        $this->validation->rule('mid', ['Rule_Member', 'need_member']);

        return $this;
    }

    public function get_user_credit_list()
    {
        $this->rules = [
            ['pagesize', ['not_empty', 'digit', $this->rule_min(1)]],
            ['page', ['not_empty', 'digit', $this->rule_min(1)]],
            ['type', ['digit', $this->rule_in_array([0, 1, 2])]],
        ];

        $this->validation->rule('mid', ['Rule_Member', 'need_member']);

        return $this;
    }

    public function get_integral_strategy()
    {
        $this->rules = [
            ['id', ['not_empty']],
            ['type_id', ['not_empty', 'digit', $this->rule_min(1)]],
        ];

        return $this;
    }

    public function get_member_sign_status()
    {
        $this->validation->rule('mid', ['Rule_Member', 'need_member']);

        return $this;
    }

    public function sign_in()
    {
        $this->validation->rule('mid', ['Rule_Member', 'need_member']);

        return $this;
    }

    public function integral_rank()
    {
        $this->validation->rule('mid', ['Rule_Member', 'need_member']);

        return $this;
    }

    public function get_grade_strategy()
    {
        $this->rules = [
            ['type', ['not_empty', 'digit', $this->rule_in_array([1, 2, 3])]],
        ];

        $this->validation->rule('mid', ['Rule_Member', 'need_member']);

        return $this;
    }
}